package five;

public class 五十抽象方法与抽象类 {
    public static void main(String[] args) {
        Dog1 a = new Dog1();
        a.shout();
        a.seeDoor();
    }
}

//抽象类
abstract class Animal1 {
    abstract public void shout();  //抽象方法
}
class Dog1 extends Animal1 {
    //子类必须实现父类的抽象方法，否则编译错误
    public void shout() {
        System.out.println("汪汪汪！");
    }
    public void seeDoor(){
        System.out.println("看门中....");
    }
}
